// pages/my/mingxi.js
var app = getApp();
Page({

  /**
   * 页面的初始数据
   */
  data: {
    list:[],
      type:0
  },
    onLoad:function(e){
      this.setData({
          type:e.type
      })
        this.getDataList();
    },
    onShow:function(e){
      var that = this;

    },
    getDataList:function(){
    var that = this;
    var path = '';
    var type = that.data.type;
    if(3 != type){
        path = app.data.server + '/index.php/Tongcheng/Book/shouRuMingxi?type='+that.data.type;
    }else{//押金明细
        path = app.data.server + '/index.php/Tongcheng/Book/yaJinMingXi?type='+that.data.type
    }
        wx.request({
            url:path,
            data:{
                price:this.data.price,
                openid:getApp().globalData.userInfo.openid,
                uid:getApp().globalData.userInfo.uid
            },
            success:function(d){
                // console.log('123'+JSON.stringify(d.data));
              that.setData({
                  list:d.data
              })
            }
        });
    }
})